<template>
    <div class='bg'>
        <el-button type="button" class='bacToIndex' size="mini" @click="backtoIndex">返回</el-button>
        <div class='iframContent'>
            <iframe width="100%" height='100%' :src="url" frameborder="0"></iframe>

            <!-- <object :data="url" type="text/html" style="width: 100%; height:100%; overflow-y: scroll"></object> -->
        </div>
        
    </div>
</template>
<script>
export default {
    data() {
        return {
            url: '',
            lastSocial: false,
        }
    },
    created() {
        console.log(this.$route.params)
        this.url = this.$route.params.url
        this.lastSocial = this.$route.params.lastSocial
        console.log(this.url)
        // $('.iframContent').load(this.$route.params.url);
    },
    mounted() {
        // window.open(this.$route.params.url);
    },
    methods: {
        backtoIndex() {
            if(!this.lastSocial)
                this.$router.push({ path: '/solution' })
            else
                this.$router.push({ path: '/social1' })
        },
    }
}
</script>
<style scoped lang='less'>
.bg {
    overflow: hidden;
}
.iframContent {
    height: 100vh;
}
.bacToIndex {
    height: 40px;
  position: absolute;
  margin: 38px 30px;
  background-color: #001e69;
  color: #fff;
  font-weight: bold;
  border-radius: 8px;
//   border: 1px solid red;
}
</style>